<!DOCTYPE html>

<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

<title>class TJP::TJPlurker - TJPlurker API Documentation</title>

<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
</script>

<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>


<body id="top" class="class">
<nav id="metadata">
  <nav id="home-section" class="section">
  <h3 class="section-header">
    <a href="../index.html">Home</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </h3>
</nav>


  <nav id="search-section" class="section project-section" class="initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <h3 class="section-header">
      <input type="text" name="search" placeholder="Search" id="search-field"
             title="Type to search, Up and Down to navigate, Enter to load">
    </h3>
  </form>

  <ul id="search-results" class="initially-hidden"></ul>
</nav>


  <div id="file-metadata">
    <nav id="file-list-section" class="section">
  <h3 class="section-header">Defined In</h3>
  <ul>
    <li>lib/tjplurker/core.rb
  </ul>
</nav>

    
  </div>

  <div id="class-metadata">
    <nav id="sections-section" class="section">
  <h3 class="section-header">Sections</h3>
  <ul class="link-list">
    
      <li><a href="#5Buntitled-5D"></a></li>
    
      <li><a href="#Alerts">Alerts</a></li>
    
      <li><a href="#Blocks">Blocks</a></li>
    
      <li><a href="#Cliques">Cliques</a></li>
    
      <li><a href="#Emoticons">Emoticons</a></li>
    
      <li><a href="#Friends+and+Fans">Friends and Fans</a></li>
    
      <li><a href="#PlurkTop">PlurkTop</a></li>
    
      <li><a href="#Polling">Polling</a></li>
    
      <li><a href="#Profile">Profile</a></li>
    
      <li><a href="#Real+Time+Notifications">Real Time Notifications</a></li>
    
      <li><a href="#Response">Response</a></li>
    
      <li><a href="#Search">Search</a></li>
    
      <li><a href="#TJPlurker+Provided">TJPlurker Provided</a></li>
    
      <li><a href="#Timeline">Timeline</a></li>
    
      <li><a href="#Users">Users</a></li>
    
  </ul>
</nav>

    <nav id="parent-class-section" class="section">
  <h3 class="section-header">Parent</h3>
  
  <p class="link">Object
  
</nav>

    
    <!-- Method Quickref -->
<nav id="method-list-section" class="section">
  <h3 class="section-header">Methods</h3>

  <ul class="link-list">
    
    <li><a href="#method-c-new">::new</a>
    
    <li><a href="#method-i-add_all_as_fan">#add_all_as_fan</a>
    
    <li><a href="#method-i-add_all_as_friends">#add_all_as_friends</a>
    
    <li><a href="#method-i-add_as_fan">#add_as_fan</a>
    
    <li><a href="#method-i-add_as_friend">#add_as_friend</a>
    
    <li><a href="#method-i-api">#api</a>
    
    <li><a href="#method-i-authorize">#authorize</a>
    
    <li><a href="#method-i-become_fan">#become_fan</a>
    
    <li><a href="#method-i-become_friend">#become_friend</a>
    
    <li><a href="#method-i-block">#block</a>
    
    <li><a href="#method-i-blocks_get">#blocks_get</a>
    
    <li><a href="#method-i-cliques_add">#cliques_add</a>
    
    <li><a href="#method-i-cliques_remove">#cliques_remove</a>
    
    <li><a href="#method-i-comet_channel">#comet_channel</a>
    
    <li><a href="#method-i-create_clique">#create_clique</a>
    
    <li><a href="#method-i-deny_friendship">#deny_friendship</a>
    
    <li><a href="#method-i-emoticons_get">#emoticons_get</a>
    
    <li><a href="#method-i-favorite_plurks">#favorite_plurks</a>
    
    <li><a href="#method-i-get_active">#get_active</a>
    
    <li><a href="#method-i-get_authorize_url">#get_authorize_url</a>
    
    <li><a href="#method-i-get_clique">#get_clique</a>
    
    <li><a href="#method-i-get_cliques">#get_cliques</a>
    
    <li><a href="#method-i-get_collections">#get_collections</a>
    
    <li><a href="#method-i-get_completion">#get_completion</a>
    
    <li><a href="#method-i-get_fans">#get_fans</a>
    
    <li><a href="#method-i-get_fans_by_offset">#get_fans_by_offset</a>
    
    <li><a href="#method-i-get_following">#get_following</a>
    
    <li><a href="#method-i-get_following_by_offset">#get_following_by_offset</a>
    
    <li><a href="#method-i-get_friends">#get_friends</a>
    
    <li><a href="#method-i-get_friends_by_offset">#get_friends_by_offset</a>
    
    <li><a href="#method-i-get_history">#get_history</a>
    
    <li><a href="#method-i-get_karma_stats">#get_karma_stats</a>
    
    <li><a href="#method-i-get_own_profile">#get_own_profile</a>
    
    <li><a href="#method-i-get_plurk">#get_plurk</a>
    
    <li><a href="#method-i-get_plurks">#get_plurks</a>
    
    <li><a href="#method-i-get_public_plurks">#get_public_plurks</a>
    
    <li><a href="#method-i-get_public_profile">#get_public_profile</a>
    
    <li><a href="#method-i-get_unread_count">#get_unread_count</a>
    
    <li><a href="#method-i-get_unread_plurks">#get_unread_plurks</a>
    
    <li><a href="#method-i-get_user_channel">#get_user_channel</a>
    
    <li><a href="#method-i-mark_as_read">#mark_as_read</a>
    
    <li><a href="#method-i-mute_plurks">#mute_plurks</a>
    
    <li><a href="#method-i-plurk_add">#plurk_add</a>
    
    <li><a href="#method-i-plurk_delete">#plurk_delete</a>
    
    <li><a href="#method-i-plurk_edit">#plurk_edit</a>
    
    <li><a href="#method-i-plurk_search">#plurk_search</a>
    
    <li><a href="#method-i-plurk_top_get_plurks">#plurk_top_get_plurks</a>
    
    <li><a href="#method-i-remove_as_friend">#remove_as_friend</a>
    
    <li><a href="#method-i-remove_notification">#remove_notification</a>
    
    <li><a href="#method-i-rename_clique">#rename_clique</a>
    
    <li><a href="#method-i-response_add">#response_add</a>
    
    <li><a href="#method-i-response_delete">#response_delete</a>
    
    <li><a href="#method-i-response_get">#response_get</a>
    
    <li><a href="#method-i-set_following">#set_following</a>
    
    <li><a href="#method-i-super_become_fan">#super_become_fan</a>
    
    <li><a href="#method-i-timeline_get_plurks">#timeline_get_plurks</a>
    
    <li><a href="#method-i-unblock">#unblock</a>
    
    <li><a href="#method-i-unfavorite_plurks">#unfavorite_plurks</a>
    
    <li><a href="#method-i-unmute_plurks">#unmute_plurks</a>
    
    <li><a href="#method-i-user_search">#user_search</a>
    
  </ul>
</nav>

  </div>

  <div id="project-metadata">
    <nav id="fileindex-section" class="section project-section">
  <h3 class="section-header">Pages</h3>

  <ul>
  
    <li class="file"><a href="../GETSTART.html">GETSTART</a>
  
    <li class="file"><a href="../MAKEROBOT.html">MAKEROBOT</a>
  
    <li class="file"><a href="../README.html">README</a>
  
  </ul>
</nav>

    <nav id="classindex-section" class="section project-section">
  <h3 class="section-header">Class and Module Index</h3>

  <ul class="link-list">
  
    <li><a href="../Legacy.html">Legacy</a>
  
    <li><a href="../Legacy/TJPlurker.html">Legacy::TJPlurker</a>
  
    <li><a href="../Legacy/TJPlurker/NotificationData.html">Legacy::TJPlurker::NotificationData</a>
  
    <li><a href="../Legacy/TJPlurker/Robot.html">Legacy::TJPlurker::Robot</a>
  
    <li><a href="../Legacy/TJPlurker/Service.html">Legacy::TJPlurker::Service</a>
  
    <li><a href="../Legacy/TJPlurker/ThreadService.html">Legacy::TJPlurker::ThreadService</a>
  
    <li><a href="../TJP.html">TJP</a>
  
    <li><a href="../TJP/NotificationData.html">TJP::NotificationData</a>
  
    <li><a href="../TJP/Robot.html">TJP::Robot</a>
  
    <li><a href="../TJP/Service.html">TJP::Service</a>
  
    <li><a href="../TJP/TJPlurker.html">TJP::TJPlurker</a>
  
    <li><a href="../TJP/ThreadService.html">TJP::ThreadService</a>
  
  </ul>
</nav>

  </div>
</nav>

<div id="documentation">
  <h1 class="class">class TJP::TJPlurker</h1>

  <div id="description" class="description">
    
<p>It’s core class of <a href="TJPlurker.html">TJPlurker</a> based on <a
href="http://www.plurk.com/API">Plurk API 2.0</a>. Note that every API
wrapped methods in this class returns a JSON object All mehtods will retry
again when request timeout occurs.</p>

  </div><!-- description -->

  
  
  
  <section id="5Buntitled-5D" class="documentation-section">
    

    

    

    

    <!-- Methods -->
    
     <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
      <h3 class="section-header">Public Class Methods</h3>

    
      <div id="method-c-new" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">new</span><span
            class="method-args">(key, secret, token=nil, token_secret=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>It will automatically authorize if <code>access_token</code> and
<code>access_token_secret</code> are both given. If you do not have access
token and secret, leave the parameters blank, and you will be asked to
enter verification code to get access token and secret.</p>
<dl class="rdoc-list note-list"><dt>key
<dd>
<p>consumer key</p>
</dd><dt>secret
<dd>
<p>consumer secret</p>
</dd><dt>return
<dd>
<p>OAuth::AccessToken</p>
</dd></dl>
          

          
          <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 25</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">secret</span>, <span class="ruby-identifier">token</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">token_secret</span>=<span class="ruby-keyword">nil</span>)
    <span class="ruby-ivar">@key</span>, <span class="ruby-ivar">@secret</span>, <span class="ruby-ivar">@token</span>, <span class="ruby-ivar">@token_secret</span> = <span class="ruby-identifier">key</span>, <span class="ruby-identifier">secret</span>, <span class="ruby-identifier">token</span>, <span class="ruby-identifier">token_secret</span>
    <span class="ruby-ivar">@consumer</span> = <span class="ruby-constant">OAuth</span><span class="ruby-operator">::</span><span class="ruby-constant">Consumer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@key</span>, <span class="ruby-ivar">@secret</span>, {
        <span class="ruby-value">:site</span>               =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'http://www.plurk.com'</span>,
        <span class="ruby-value">:scheme</span>             =<span class="ruby-operator">&gt;</span> <span class="ruby-value">:header</span>,
        <span class="ruby-value">:http_method</span>        =<span class="ruby-operator">&gt;</span> <span class="ruby-value">:post</span>,
        <span class="ruby-value">:request_token_path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'/OAuth/request_token'</span>,
        <span class="ruby-value">:access_token_path</span>  =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'/OAuth/access_token'</span>,
        <span class="ruby-value">:authorize_path</span>     =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'/OAuth/authorize'</span>
    })
<span class="ruby-keyword">end</span></pre>
          </div><!-- new-source -->
          
        </div>

        

        
      </div><!-- new-method -->

    
    </section><!-- public-class-method-details -->
  
     <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-api" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">api</span><span
            class="method-args">(url, body=nil, headers=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>url
<dd>
<p>plurk APP url in String</p>
</dd><dt>body
<dd>
<p>options in Hash</p>
</dd><dt>return
<dd>
<p>result in JSON</p>
</dd></dl>
          

          
          <div class="method-source-code" id="api-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 66</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">api</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">body</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">headers</span>=<span class="ruby-keyword">nil</span>)
    <span class="ruby-comment"># clone consumer for supporting thread</span>
    <span class="ruby-identifier">access_token</span> = <span class="ruby-constant">OAuth</span><span class="ruby-operator">::</span><span class="ruby-constant">AccessToken</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@consumer</span>.<span class="ruby-identifier">clone</span>, <span class="ruby-ivar">@token</span>, <span class="ruby-ivar">@token_secret</span>)
    <span class="ruby-identifier">resp</span> = <span class="ruby-identifier">access_token</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">body</span>, <span class="ruby-identifier">headers</span>).<span class="ruby-identifier">body</span>
    <span class="ruby-identifier">json</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">resp</span>)
    <span class="ruby-identifier">$tjpLog</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>){<span class="ruby-node">&quot;Response: #{json}&quot;</span>}
    <span class="ruby-identifier">$tjpLog</span>.<span class="ruby-identifier">error</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>){<span class="ruby-identifier">json</span>[<span class="ruby-string">&quot;error_text&quot;</span>]} <span class="ruby-keyword">if</span> <span class="ruby-identifier">json</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">json</span>[<span class="ruby-string">&quot;error_text&quot;</span>]
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">json</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- api-source -->
          
        </div>

        

        
      </div><!-- api-method -->

    
      <div id="method-i-authorize" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">authorize</span><span
            class="method-args">(access_token=nil, access_token_secret=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Change or get access token and secret. If parameters are not both given,
user will be asked to enter verfication code, otherwise, replace the access
token and secret.</p>
<dl class="rdoc-list note-list"><dt>return
<dd>
<p>access token and access token secret in Array</p>
</dd></dl>
          

          
          <div class="method-source-code" id="authorize-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 48</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">authorize</span>(<span class="ruby-identifier">access_token</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">access_token_secret</span>=<span class="ruby-keyword">nil</span>)
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">access_token</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">access_token_secret</span>
        <span class="ruby-comment">#@access_token = OAuth::AccessToken.new(@consumer, access_token, access_token_secret)</span>
        <span class="ruby-ivar">@token</span>, <span class="ruby-ivar">@token_secret</span> = <span class="ruby-identifier">access_token</span>, <span class="ruby-identifier">access_token_secret</span>
    <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Authorize URL: #{get_authorize_url}&quot;</span>
        <span class="ruby-identifier">print</span> <span class="ruby-string">&quot;Please Enter your verification code: &quot;</span>
        <span class="ruby-identifier">verify</span> = <span class="ruby-identifier">gets</span>.<span class="ruby-identifier">chomp!</span>
        <span class="ruby-identifier">access_token</span> = <span class="ruby-ivar">@request_token</span>.<span class="ruby-identifier">get_access_token</span> <span class="ruby-value">:oauth_verifier=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">verify</span>
        <span class="ruby-ivar">@token</span>, <span class="ruby-ivar">@token_secret</span> = <span class="ruby-identifier">access_token</span>.<span class="ruby-identifier">token</span>, <span class="ruby-identifier">access_token</span>.<span class="ruby-identifier">secret</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">$tjpLog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>){<span class="ruby-node">&quot;Access Token: #{@token}, Access Token Secret: #{@token_secret}&quot;</span>}
    <span class="ruby-keyword">return</span> <span class="ruby-ivar">@token</span>, <span class="ruby-ivar">@token_secret</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- authorize-source -->
          
        </div>

        

        
      </div><!-- authorize-method -->

    
      <div id="method-i-get_authorize_url" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_authorize_url</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>return
<dd>
<p>authorize URL</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_authorize_url-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 39</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_authorize_url</span>
    <span class="ruby-ivar">@request_token</span> = <span class="ruby-ivar">@consumer</span>.<span class="ruby-identifier">get_request_token</span>
    <span class="ruby-keyword">return</span> <span class="ruby-ivar">@request_token</span>.<span class="ruby-identifier">authorize_url</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_authorize_url-source -->
          
        </div>

        

        
      </div><!-- get_authorize_url-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- 5Buntitled-5D -->

  
  
  <section id="Alerts" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Alerts
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
<h3 id="Alerts-label-General+data+structures">General data structures</h3>

<p>The data returned by getActive and getHistory can be of following nature:
Friendship request:</p>

<pre>{&quot;type&quot;: &quot;friendship_request&quot;, &quot;from_user&quot;: {&quot;nick_name&quot;: ...}, &quot;posted&quot;: ...}</pre>

<p>Friendship pending:</p>

<pre>{&quot;type&quot;: &quot;friendship_pending&quot;, &quot;to_user&quot;: {&quot;nick_name&quot;: ...}, &quot;posted&quot;: ...}</pre>

<p>New fan notification: (does not require actions from the user)</p>

<pre>{&quot;type&quot;: &quot;new_fan&quot;, &quot;new_fan&quot;: {&quot;nick_name&quot;: ...}, &quot;posted&quot;: ...}</pre>

<p>Friendship accepted notification: (does not require actions from the user)</p>

<pre>{&quot;type&quot;: &quot;friendship_accepted&quot;, &quot;friend_info&quot;: {&quot;nick_name&quot;: ...}, &quot;posted&quot;: ...}</pre>

<p>New friend notification: (does not require actions from the user)</p>

<pre>{&quot;type&quot;: &quot;new_friend&quot;, &quot;new_friend&quot;: {&quot;nick_name&quot;: ...}, &quot;posted&quot;: ...}</pre>

    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Alerts-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-add_all_as_fan" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">add_all_as_fan</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Accept all friendship requests as fans.</p>
          

          
          <div class="method-source-code" id="add_all_as_fan-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 435</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add_all_as_fan</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Alerts/addAllAsFan&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- add_all_as_fan-source -->
          
        </div>

        

        
      </div><!-- add_all_as_fan-method -->

    
      <div id="method-i-add_all_as_friends" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">add_all_as_friends</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Accept all friendship requests as friends.</p>
          

          
          <div class="method-source-code" id="add_all_as_friends-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 441</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add_all_as_friends</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Alerts/addAllAsFriends&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- add_all_as_friends-source -->
          
        </div>

        

        
      </div><!-- add_all_as_friends-method -->

    
      <div id="method-i-add_as_fan" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">add_as_fan</span><span
            class="method-args">(user_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>user_id
<dd>
<p>The user_id that has asked for friendship.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="add_as_fan-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 428</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add_as_fan</span> <span class="ruby-identifier">user_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Alerts/addAsFan&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- add_as_fan-source -->
          
        </div>

        

        
      </div><!-- add_as_fan-method -->

    
      <div id="method-i-add_as_friend" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">add_as_friend</span><span
            class="method-args">(user_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Accept user_id as friend.</p>
<dl class="rdoc-list note-list"><dt>user_id
<dd>
<p>The user_id that has asked for friendship.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="add_as_friend-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 448</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add_as_friend</span> <span class="ruby-identifier">user_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Alerts/addAsFriend&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- add_as_friend-source -->
          
        </div>

        

        
      </div><!-- add_as_friend-method -->

    
      <div id="method-i-deny_friendship" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">deny_friendship</span><span
            class="method-args">(user_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Deny friendship to user_id.</p>
<dl class="rdoc-list note-list"><dt>user_id
<dd>
<p>The user_id that has asked for friendship.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="deny_friendship-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 456</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">deny_friendship</span> <span class="ruby-identifier">user_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Alerts/denyFriendship&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- deny_friendship-source -->
          
        </div>

        

        
      </div><!-- deny_friendship-method -->

    
      <div id="method-i-get_active" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_active</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Return a JSON list of current active alerts.</p>
          

          
          <div class="method-source-code" id="get_active-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 416</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_active</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Alerts/getActive&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_active-source -->
          
        </div>

        

        
      </div><!-- get_active-method -->

    
      <div id="method-i-get_history" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_history</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Return a JSON list of past 30 alerts.</p>
          

          
          <div class="method-source-code" id="get_history-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 422</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_history</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Alerts/getHistory&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_history-source -->
          
        </div>

        

        
      </div><!-- get_history-method -->

    
      <div id="method-i-remove_notification" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">remove_notification</span><span
            class="method-args">(user_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Remove notification to user with id user_id.</p>
<dl class="rdoc-list note-list"><dt>user_id
<dd>
<p>The user_id that the current user has requested friendship for.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="remove_notification-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 464</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">remove_notification</span> <span class="ruby-identifier">user_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Alerts/removeNotification&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- remove_notification-source -->
          
        </div>

        

        
      </div><!-- remove_notification-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Alerts -->

  
  
  <section id="Blocks" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Blocks
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Blocks-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-block" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">block</span><span
            class="method-args">(user_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>user_id
<dd>
<p>The id of the user that should be blocked.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="block-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 515</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">block</span> <span class="ruby-identifier">user_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Blocks/block&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- block-source -->
          
        </div>

        

        
      </div><!-- block-method -->

    
      <div id="method-i-blocks_get" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">blocks_get</span><span
            class="method-args">(offset=0)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>offset
<dd>
<p>What page should be shown, e.g. 0, 10, 20.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="blocks_get-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 508</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">blocks_get</span> <span class="ruby-identifier">offset</span>=<span class="ruby-value">0</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Blocks/get&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- blocks_get-source -->
          
        </div>

        

        
      </div><!-- blocks_get-method -->

    
      <div id="method-i-unblock" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">unblock</span><span
            class="method-args">(user_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>user_id: The id of the user that should be unblocked.</p>
          

          
          <div class="method-source-code" id="unblock-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 522</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">unblock</span> <span class="ruby-identifier">user_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Blocks/unblock&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- unblock-source -->
          
        </div>

        

        
      </div><!-- unblock-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Blocks -->

  
  
  <section id="Cliques" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Cliques
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Cliques-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-cliques_add" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">cliques_add</span><span
            class="method-args">(clique_name, user_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>clique_name
<dd>
<p>The name of the clique</p>
</dd><dt>user_id
<dd>
<p>The user to add to the clique</p>
</dd></dl>
          

          
          <div class="method-source-code" id="cliques_add-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 559</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">cliques_add</span> <span class="ruby-identifier">clique_name</span>, <span class="ruby-identifier">user_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Cliques/add&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:clique_name=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">clique_name</span>, <span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- cliques_add-source -->
          
        </div>

        

        
      </div><!-- cliques_add-method -->

    
      <div id="method-i-cliques_remove" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">cliques_remove</span><span
            class="method-args">(clique_name, user_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>clique_name
<dd>
<p>The name of the clique</p>
</dd><dt>user_id
<dd>
<p>The user to remove from the clique</p>
</dd></dl>
          

          
          <div class="method-source-code" id="cliques_remove-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 567</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">cliques_remove</span> <span class="ruby-identifier">clique_name</span>, <span class="ruby-identifier">user_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Cliques/remove&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:clique_name=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">clique_name</span>, <span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- cliques_remove-source -->
          
        </div>

        

        
      </div><!-- cliques_remove-method -->

    
      <div id="method-i-create_clique" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">create_clique</span><span
            class="method-args">(clique_name)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>clique_name
<dd>
<p>The name of the new clique</p>
</dd></dl>
          

          
          <div class="method-source-code" id="create_clique-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 543</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">create_clique</span> <span class="ruby-identifier">clique_name</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Cliques/createClique&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:clique_name=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">clique_name</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- create_clique-source -->
          
        </div>

        

        
      </div><!-- create_clique-method -->

    
      <div id="method-i-get_clique" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_clique</span><span
            class="method-args">(clique_name)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>clique_name
<dd>
<p>The name of the new clique</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_clique-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 536</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_clique</span> <span class="ruby-identifier">clique_name</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Cliques/getClique&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:clique_name=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">clique_name</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_clique-source -->
          
        </div>

        

        
      </div><!-- get_clique-method -->

    
      <div id="method-i-get_cliques" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_cliques</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          
          

          
          <div class="method-source-code" id="get_cliques-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 530</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_cliques</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Cliques/getCliques&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_cliques-source -->
          
        </div>

        

        
      </div><!-- get_cliques-method -->

    
      <div id="method-i-rename_clique" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">rename_clique</span><span
            class="method-args">(clique_name, new_name)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>clique_name
<dd>
<p>The name of the clique to rename</p>
</dd><dt>new_name
<dd>
<p>The name of the new clique</p>
</dd></dl>
          

          
          <div class="method-source-code" id="rename_clique-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 551</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">rename_clique</span> <span class="ruby-identifier">clique_name</span>, <span class="ruby-identifier">new_name</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Cliques/renameClique&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:clique_name=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">clique_name</span>, <span class="ruby-value">:new_name=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">new_name</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- rename_clique-source -->
          
        </div>

        

        
      </div><!-- rename_clique-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Cliques -->

  
  
  <section id="Emoticons" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Emoticons
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Emoticons-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-emoticons_get" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">emoticons_get</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Emoticons are a big part of Plurk since they make it easy to express
feelings. Check out current Plurk emoticons. This call returns a JSON
object that looks like:</p>

<pre>{&quot;karma&quot;: {&quot;0&quot;: [[&quot;:-))&quot;, &quot;http:\/\/statics.plurk.com\/XXX.gif&quot;], ...], ...},
&quot;recuited&quot;: {&quot;10&quot;: [[&quot;(bigeyes)&quot;, &quot;http:\/\/statics.plurk.com\/XXX.gif&quot;], ...], ...} }</pre>

<p><a href="http://"karma"">emoticons</a>[25] denotes that the user has to
have karma over 25 to use these emoticons. <a
href="http://"recuited"">emoticons</a>[10] means that the user has to have
user.recuited &gt;= 10 to use these emoticons. It's important to check for
these things on the client as well, since the emoticon levels are checked
in the models.</p>
          

          
          <div class="method-source-code" id="emoticons_get-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 500</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">emoticons_get</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Emoticons/get&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- emoticons_get-source -->
          
        </div>

        

        
      </div><!-- emoticons_get-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Emoticons -->

  
  
  <section id="Friends+and+Fans" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Friends and Fans
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Friends+and+Fans-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-become_fan" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">become_fan</span><span
            class="method-args">(fan_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Become fan of fan_id. To stop being a fan of someone, use <a
href="TJPlurker.html#method-i-set_following">#set_following</a></p>
<dl class="rdoc-list note-list"><dt>fan_id
<dd>
<p>The ID of the user you want to become fan of</p>
</dd></dl>
          

          
          <div class="method-source-code" id="become_fan-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 371</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">become_fan</span> <span class="ruby-identifier">fan_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/FriendsFans/becomeFan&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:fan_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">fan_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- become_fan-source -->
          
        </div>

        

        
      </div><!-- become_fan-method -->

    
      <div id="method-i-become_friend" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">become_friend</span><span
            class="method-args">(friend_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Create a friend request to friend_id. User with friend_id has to accept a
friendship.</p>
<dl class="rdoc-list note-list"><dt>friend_id
<dd>
<p>The ID of the user you want to befriend.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="become_friend-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 355</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">become_friend</span> <span class="ruby-identifier">friend_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/FriendsFans/becomeFriend&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:friend_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">friend_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- become_friend-source -->
          
        </div>

        

        
      </div><!-- become_friend-method -->

    
      <div id="method-i-get_completion" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_completion</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns a JSON object of the logged in users friends (nick name and full
name). This information can be used to construct auto-completion for
private plurking. Notice that a friend list can be big, depending on how
many friends a user has, so this list should be lazy-loaded in your
application.</p>
          

          
          <div class="method-source-code" id="get_completion-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 392</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_completion</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/FriendsFans/getCompletion&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_completion-source -->
          
        </div>

        

        
      </div><!-- get_completion-method -->

    
      <div id="method-i-get_fans_by_offset" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_fans_by_offset</span><span
            class="method-args">(user_id, limit=100, offset=0)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns user_id’s fans list in chucks of 100 fans at a time. However, We
suggest you use <a href="TJPlurker.html#method-i-get_fans">#get_fans</a>
instead of <a
href="TJPlurker.html#method-i-get_fans_by_offset">#get_fans_by_offset</a></p>
<dl class="rdoc-list note-list"><dt>limit
<dd>
<p>The max number of friends to be returned.</p>
</dd><dt>offset
<dd>
<p>Can be Numeric or String, e.g. 10, “20”, 30, “40” etc.</p>
</dd><dt>return
<dd>
<p>An Array</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_fans_by_offset-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 336</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_fans_by_offset</span> <span class="ruby-identifier">user_id</span>, <span class="ruby-identifier">limit</span>=<span class="ruby-value">100</span>, <span class="ruby-identifier">offset</span>=<span class="ruby-value">0</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/FriendsFans/getFansByOffset&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>, <span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>, <span class="ruby-value">:limit=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">limit</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_fans_by_offset-source -->
          
        </div>

        

        
      </div><!-- get_fans_by_offset-method -->

    
      <div id="method-i-get_following_by_offset" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_following_by_offset</span><span
            class="method-args">(limit=100, offset=0)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns users that the current logged in user follows as fan - in chucks of
100 fans at a time. However, We suggest you use <a
href="TJPlurker.html#method-i-get_following">#get_following</a> instead of
<a
href="TJPlurker.html#method-i-get_following_by_offset">#get_following_by_offset</a></p>
<dl class="rdoc-list note-list"><dt>limit
<dd>
<p>The max number of friends to be returned.</p>
</dd><dt>offset
<dd>
<p>Can be Numeric or String, e.g. 10, “20”, 30, “40” etc.</p>
</dd><dt>return
<dd>
<p>An Array</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_following_by_offset-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 347</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_following_by_offset</span> <span class="ruby-identifier">limit</span>=<span class="ruby-value">100</span>, <span class="ruby-identifier">offset</span>=<span class="ruby-value">0</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/FriendsFans/getFollowingByOffset&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>, <span class="ruby-value">:limit=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">limit</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_following_by_offset-source -->
          
        </div>

        

        
      </div><!-- get_following_by_offset-method -->

    
      <div id="method-i-get_friends_by_offset" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_friends_by_offset</span><span
            class="method-args">(user_id, limit=100, offset=0)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns user_id’s friend list in chucks of 100 friends at a time. However,
We suggest you use <a
href="TJPlurker.html#method-i-get_friends">#get_friends</a> instead of <a
href="TJPlurker.html#method-i-get_friends_by_offset">#get_friends_by_offset</a></p>
<dl class="rdoc-list note-list"><dt>limit
<dd>
<p>The max number of friends to be returned.</p>
</dd><dt>offset
<dd>
<p>Can be Numeric or String, e.g. 10, “20”, 30, “40” etc.</p>
</dd><dt>return
<dd>
<p>An Array</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_friends_by_offset-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 325</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_friends_by_offset</span> <span class="ruby-identifier">user_id</span>, <span class="ruby-identifier">limit</span>=<span class="ruby-value">100</span>, <span class="ruby-identifier">offset</span>=<span class="ruby-value">0</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/FriendsFans/getFriendsByOffset&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>, <span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>, <span class="ruby-value">:limit=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">limit</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_friends_by_offset-source -->
          
        </div>

        

        
      </div><!-- get_friends_by_offset-method -->

    
      <div id="method-i-remove_as_friend" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">remove_as_friend</span><span
            class="method-args">(friend_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Remove friend with ID friend_id. friend_id won’t be notified.</p>
<dl class="rdoc-list note-list"><dt>friend_id
<dd>
<p>The ID of the user you want to remove</p>
</dd></dl>
          

          
          <div class="method-source-code" id="remove_as_friend-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 363</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">remove_as_friend</span> <span class="ruby-identifier">friend_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/FriendsFans/removeAsFriend&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:friend_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">friend_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- remove_as_friend-source -->
          
        </div>

        

        
      </div><!-- remove_as_friend-method -->

    
      <div id="method-i-set_following" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">set_following</span><span
            class="method-args">(user_id, follow=true)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Update following of user_id. A user can befriend someone, but can unfollow
them. This request is also used to stop following someone as a fan.</p>
<dl class="rdoc-list note-list"><dt>user_id
<dd>
<p>The ID of the user you want to follow/unfollow</p>
</dd><dt>follow
<dd>
<p>Normally, true if the user should be followed, and false if the user should
be unfollowed. Actually, toggle the follwing state no matter you give true
or false</p>
</dd></dl>
          

          
          <div class="method-source-code" id="set_following-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 382</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">set_following</span> <span class="ruby-identifier">user_id</span>, <span class="ruby-identifier">follow</span>=<span class="ruby-keyword">true</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/FriendsFans/setFollowing&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>, <span class="ruby-value">:follow=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">follow</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- set_following-source -->
          
        </div>

        

        
      </div><!-- set_following-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Friends+and+Fans -->

  
  
  <section id="PlurkTop" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        PlurkTop
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-PlurkTop-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-get_collections" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_collections</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          
          

          
          <div class="method-source-code" id="get_collections-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 575</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_collections</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/PlurkTop/getCollections&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_collections-source -->
          
        </div>

        

        
      </div><!-- get_collections-method -->

    
      <div id="method-i-plurk_top_get_plurks" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">plurk_top_get_plurks</span><span
            class="method-args">(collection_name, limit=nil, offset=nil, sorting=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>collection_name
<dd>
<p>only get plurks in specified collection</p>
</dd><dt>offset
<dd>
<p>offset of Plurks in PlurkTop, should be an float, e.g. 0.99.</p>
</dd><dt>limit
<dd>
<p>number of plurks returned (default: 30)</p>
</dd><dt>sorting
<dd>
<p>the way to sort plurks in PlurkTop, can be “hot” for sorting by popularity
or “new” for posted time.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="plurk_top_get_plurks-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 584</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">plurk_top_get_plurks</span> <span class="ruby-identifier">collection_name</span>, <span class="ruby-identifier">limit</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">offset</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">sorting</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/PlurkTop/getPlurks&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:collection_name=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">collection_name</span>, <span class="ruby-value">:limit=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">limit</span>, <span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>, <span class="ruby-value">:sorting=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">sorting</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- plurk_top_get_plurks-source -->
          
        </div>

        

        
      </div><!-- plurk_top_get_plurks-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- PlurkTop -->

  
  
  <section id="Polling" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Polling
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Polling-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-get_plurks" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_plurks</span><span
            class="method-args">(offset, limit=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>You should use this call to find out if there any new plurks posted to the
user’s timeline. It’s much more efficient than doing it with <a
href="TJPlurker.html#method-i-timeline_get_plurks">#timeline_get_plurks</a>,
so please use it :)</p>
<dl class="rdoc-list note-list"><dt>offset
<dd>
<p>Return plurks newer than offset, formatted as 2009-6-20T21:55:34 in String
or in Time.</p>
</dd><dt>limit
<dd>
<p>The max number of plurks to be returned (default: 20)</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_plurks-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 159</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_plurks</span> <span class="ruby-identifier">offset</span>, <span class="ruby-identifier">limit</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Polling/getPlurks&quot;</span>
    <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">offset</span>.<span class="ruby-identifier">utc</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">&quot;%Y-%m-%dT%H:%M:%S&quot;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">offset</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Time</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>, <span class="ruby-value">:limit=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">limit</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_plurks-source -->
          
        </div>

        

        
      </div><!-- get_plurks-method -->

    
      <div id="method-i-get_unread_count" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_unread_count</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Use this call to find out if there are unread plurks on a user’s timeline.</p>
          

          
          <div class="method-source-code" id="get_unread_count-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 167</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_unread_count</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Polling/getUnreadCount&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_unread_count-source -->
          
        </div>

        

        
      </div><!-- get_unread_count-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Polling -->

  
  
  <section id="Profile" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Profile
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Profile-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-get_own_profile" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_own_profile</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns data that’s private for the current user. This can be used to
construct a profile and render a timeline of the latest plurks.</p>
          

          
          <div class="method-source-code" id="get_own_profile-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 89</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_own_profile</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Profile/getOwnProfile&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_own_profile-source -->
          
        </div>

        

        
      </div><!-- get_own_profile-method -->

    
      <div id="method-i-get_public_profile" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_public_profile</span><span
            class="method-args">(user_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Fetches public information such as a user’s public plurks and basic
information. Fetches also if the current user is following the user, are
friends with or is a fan.</p>
          

          
          <div class="method-source-code" id="get_public_profile-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 96</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_public_profile</span> <span class="ruby-identifier">user_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Profile/getPublicProfile&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_public_profile-source -->
          
        </div>

        

        
      </div><!-- get_public_profile-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Profile -->

  
  
  <section id="Real+Time+Notifications" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Real Time Notifications
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Real+Time+Notifications-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-comet_channel" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">comet_channel</span><span
            class="method-args">() { |notification| ... }</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>It will do GET requests to user’s comet server to get new notification
data. The request will sleep for about 50 seconds before returning a
response if there is no new data added to your channel. It will
automatically get comet server URL from /APP/Realtime/getUserChannel if
there is no comet server yet, and renew <code>offset</code> each time it
was called. You don’t need to worry about URL and <code>offset</code>. For
details, see <a
href="http://www.plurk.com/API#realtime">www.plurk.com/API#realtime</a></p>
<dl class="rdoc-list note-list"><dt>return
<dd>
<p>plurk notification in Hash</p>
</dd></dl>
          

          
          <div class="method-source-code" id="comet_channel-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 121</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">comet_channel</span>
    <span class="ruby-comment">#Assign new channel if @user_channel is nil</span>
    <span class="ruby-ivar">@user_channel</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">get_user_channel</span>
    <span class="ruby-keyword">begin</span>
        <span class="ruby-identifier">res</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">get_response</span>(<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-ivar">@user_channel</span>[<span class="ruby-string">'comet_server'</span>]))
        <span class="ruby-identifier">json</span> = <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">res</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp">%rCometChannel\.scriptCallback\((.*)\);/</span>){<span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span> <span class="ruby-node">$1</span>})
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Timeout</span><span class="ruby-operator">::</span><span class="ruby-constant">Error</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ex</span>
        <span class="ruby-identifier">$tjpLog</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>){<span class="ruby-string">&quot;Request timeout, retry.&quot;</span>}
        <span class="ruby-keyword">retry</span>
    <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ECONNRESET</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ex</span>
        <span class="ruby-identifier">$tjpLog</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>){<span class="ruby-string">&quot;Connection reset, retry.&quot;</span>}
        <span class="ruby-keyword">retry</span>
    <span class="ruby-keyword">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ex</span>
        <span class="ruby-identifier">$tjpLog</span>.<span class="ruby-identifier">fatal</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>){<span class="ruby-string">&quot;Unknown error, skip.&quot;</span>}
        <span class="ruby-identifier">puts</span> <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">class</span>, <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">message</span>, <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">backtrace</span>
        <span class="ruby-keyword">return</span>
    <span class="ruby-keyword">end</span>
    <span class="ruby-comment">#Update the offset</span>
    <span class="ruby-ivar">@user_channel</span>[<span class="ruby-string">'comet_server'</span>].<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp">%r[\d]+$/</span>, <span class="ruby-identifier">json</span>[<span class="ruby-string">&quot;new_offset&quot;</span>].<span class="ruby-identifier">to_s</span>)
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">json</span>[<span class="ruby-string">'data'</span>]
        <span class="ruby-identifier">json</span>[<span class="ruby-string">'data'</span>].<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">member</span><span class="ruby-operator">|</span>
            <span class="ruby-identifier">notification</span> = <span class="ruby-constant">NotificationData</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">member</span>)
            <span class="ruby-comment"># Prevent duplicate notification</span>
            <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">notification</span>.<span class="ruby-identifier">id</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@id_buffer</span>
            <span class="ruby-identifier">$tjpLog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>){<span class="ruby-node">&quot;Notification: #{notification.user_id}: \&quot;#{notification.content}\&quot;&quot;</span>}
            <span class="ruby-ivar">@id_buffer</span> = <span class="ruby-identifier">notification</span>.<span class="ruby-identifier">id</span>
            <span class="ruby-keyword">yield</span>(<span class="ruby-identifier">notification</span>)
        }
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">json</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- comet_channel-source -->
          
        </div>

        

        
      </div><!-- comet_channel-method -->

    
      <div id="method-i-get_user_channel" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_user_channel</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Get instant notifications when there are new plurks and responses on a
user’s timeline. Generally you don’t need call this because <a
href="TJPlurker.html#method-i-comet_channel">#comet_channel</a> will
automatically do that for you. For details, see <a
href="http://www.plurk.com/API#realtime">www.plurk.com/API#realtime</a></p>
<dl class="rdoc-list note-list"><dt>return
<dd>
<p>channel name and comet server in Hash</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_user_channel-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 108</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_user_channel</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Realtime/getUserChannel&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_user_channel-source -->
          
        </div>

        

        
      </div><!-- get_user_channel-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Real+Time+Notifications -->

  
  
  <section id="Response" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Response
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Response-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-response_add" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">response_add</span><span
            class="method-args">(plurk_id, content, qualifier=':')</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Adds a responses to plurk_id. Language is inherited from the plurk.</p>
<dl class="rdoc-list note-list"><dt>plurk_id
<dd>
<p>The plurk that the responses belong to.</p>
</dd><dt>content
<dd>
<p>The response’s text.</p>
</dd><dt>qualifier
<dd>
<p>The Plurk’s qualifier, must be in English. Refers to plurk_add.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="response_add-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 303</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">response_add</span> <span class="ruby-identifier">plurk_id</span>, <span class="ruby-identifier">content</span>, <span class="ruby-identifier">qualifier</span>=<span class="ruby-string">':'</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Responses/responseAdd&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:plurk_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">plurk_id</span>, <span class="ruby-value">:content=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">content</span>, <span class="ruby-value">:qualifier=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">qualifier</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- response_add-source -->
          
        </div>

        

        
      </div><!-- response_add-method -->

    
      <div id="method-i-response_delete" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">response_delete</span><span
            class="method-args">(response_id, plurk_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Deletes a response. A user can delete own responses or responses that are
posted to own plurks.</p>

<pre>response_id:: The id of the response to delete.
plurk_id:: The plurk that the response belongs to.</pre>
          

          
          <div class="method-source-code" id="response_delete-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 312</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">response_delete</span> <span class="ruby-identifier">response_id</span>, <span class="ruby-identifier">plurk_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Responses/responseDelete&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:response_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">response_id</span>, <span class="ruby-value">:plurk_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">plurk_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- response_delete-source -->
          
        </div>

        

        
      </div><!-- response_delete-method -->

    
      <div id="method-i-response_get" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">response_get</span><span
            class="method-args">(plurk_id, from_response=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Fetches responses for plurk with plurk_id and some basic info about the
users.</p>
<dl class="rdoc-list note-list"><dt>plurk_id
<dd>
<p>The plurk that the responses belong to.</p>
</dd><dt>from_response
<dd>
<p>Only fetch responses from an offset - could be 5, 10 or 15 (default: 0)</p>
</dd></dl>
          

          
          <div class="method-source-code" id="response_get-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 293</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">response_get</span> <span class="ruby-identifier">plurk_id</span>, <span class="ruby-identifier">from_response</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Responses/get&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:plurk_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">plurk_id</span>, <span class="ruby-value">:from_response=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">from_response</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- response_get-source -->
          
        </div>

        

        
      </div><!-- response_get-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Response -->

  
  
  <section id="Search" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Search
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Search-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-plurk_search" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">plurk_search</span><span
            class="method-args">(query, offset=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns the latest 20 plurks on a search term.</p>
<dl class="rdoc-list note-list"><dt>query
<dd>
<p>The query after Plurks.</p>
</dd><dt>offset
<dd>
<p>A plurk_id of the oldest Plurk in the last search result.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="plurk_search-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 475</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">plurk_search</span> <span class="ruby-identifier">query</span>, <span class="ruby-identifier">offset</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/PlurkSearch/search&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:query=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">query</span>, <span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- plurk_search-source -->
          
        </div>

        

        
      </div><!-- plurk_search-method -->

    
      <div id="method-i-user_search" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">user_search</span><span
            class="method-args">(query, offset=0)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns 10 users that match query, users are sorted by karma.</p>
<dl class="rdoc-list note-list"><dt>query
<dd>
<p>The query after users.</p>
</dd><dt>offset
<dd>
<p>Page offset, like 10, 20, 30 etc.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="user_search-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 484</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">user_search</span> <span class="ruby-identifier">query</span>, <span class="ruby-identifier">offset</span>=<span class="ruby-value">0</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/UserSearch/search&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:query=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">query</span>, <span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- user_search-source -->
          
        </div>

        

        
      </div><!-- user_search-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Search -->

  
  
  <section id="TJPlurker+Provided" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        TJPlurker Provided
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
<p>Those methos were all provided by TJPlukrer instead of Plurk</p>

    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-TJPlurker+Provided-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-get_fans" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_fans</span><span
            class="method-args">(user_id, at_least=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Improved from <a
href="TJPlurker.html#method-i-get_fans_by_offset">#get_fans_by_offset</a>
for getting all fans from a user</p>
<dl class="rdoc-list note-list"><dt>return
<dd>
<p>An Array</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_fans-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 611</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_fans</span> <span class="ruby-identifier">user_id</span>, <span class="ruby-identifier">at_least</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">list</span> = []
    <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>;
    <span class="ruby-identifier">loop</span>{
        <span class="ruby-identifier">set</span> = <span class="ruby-identifier">get_fans_by_offset</span>(<span class="ruby-identifier">user_id</span>, <span class="ruby-value">100</span>, <span class="ruby-identifier">offset</span>)
        <span class="ruby-identifier">size</span> = <span class="ruby-identifier">set</span>.<span class="ruby-identifier">size</span>
        <span class="ruby-keyword">break</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
        <span class="ruby-identifier">list</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">set</span>
        <span class="ruby-keyword">break</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">at_least</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">&gt;=</span><span class="ruby-identifier">at_least</span>
        <span class="ruby-identifier">offset</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">size</span>
    }
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">list</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_fans-source -->
          
        </div>

        

        
      </div><!-- get_fans-method -->

    
      <div id="method-i-get_following" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_following</span><span
            class="method-args">(at_least=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Improved from <a
href="TJPlurker.html#method-i-get_following_by_offset">#get_following_by_offset</a>
for getting all fans from a user</p>
<dl class="rdoc-list note-list"><dt>return
<dd>
<p>An Array</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_following-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 627</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_following</span> <span class="ruby-identifier">at_least</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">list</span> = []
    <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>;
    <span class="ruby-identifier">loop</span>{
        <span class="ruby-identifier">set</span> = <span class="ruby-identifier">get_following_by_offset</span>(<span class="ruby-value">100</span>, <span class="ruby-identifier">offset</span>)
        <span class="ruby-identifier">size</span> = <span class="ruby-identifier">set</span>.<span class="ruby-identifier">size</span>
        <span class="ruby-keyword">break</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
        <span class="ruby-identifier">list</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">set</span>
        <span class="ruby-keyword">break</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">at_least</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">&gt;=</span><span class="ruby-identifier">at_least</span>
        <span class="ruby-identifier">offset</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">size</span>
    }
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">list</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_following-source -->
          
        </div>

        

        
      </div><!-- get_following-method -->

    
      <div id="method-i-get_friends" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_friends</span><span
            class="method-args">(user_id, at_least=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Improved from <a
href="TJPlurker.html#method-i-get_friends_by_offset">#get_friends_by_offset</a>
for getting all friends from a user</p>
<dl class="rdoc-list note-list"><dt>return
<dd>
<p>An Array</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_friends-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 595</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_friends</span> <span class="ruby-identifier">user_id</span>, <span class="ruby-identifier">at_least</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">list</span> = []
    <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>;
    <span class="ruby-identifier">loop</span>{
        <span class="ruby-identifier">set</span> = <span class="ruby-identifier">get_friends_by_offset</span>(<span class="ruby-identifier">user_id</span>, <span class="ruby-value">100</span>, <span class="ruby-identifier">offset</span>)
        <span class="ruby-identifier">size</span> = <span class="ruby-identifier">set</span>.<span class="ruby-identifier">size</span>
        <span class="ruby-keyword">break</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
        <span class="ruby-identifier">list</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">set</span>
        <span class="ruby-keyword">break</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">at_least</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">&gt;=</span><span class="ruby-identifier">at_least</span>
        <span class="ruby-identifier">offset</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">size</span>
    }
    <span class="ruby-keyword">return</span> <span class="ruby-identifier">list</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_friends-source -->
          
        </div>

        

        
      </div><!-- get_friends-method -->

    
      <div id="method-i-super_become_fan" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">super_become_fan</span><span
            class="method-args">(fan_id, level=1)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Used to follow a lot of users.</p>
<dl class="rdoc-list note-list"><dt>level
<dd>
<p>e.g. 1 for following user’s all friends, 2 for following user’s all friends
and all friends of all friends.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="super_become_fan-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 643</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">super_become_fan</span> <span class="ruby-identifier">fan_id</span>, <span class="ruby-identifier">level</span>=<span class="ruby-value">1</span>
    <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">level</span><span class="ruby-operator">&lt;=</span><span class="ruby-value">0</span>
    <span class="ruby-identifier">become_fan</span>(<span class="ruby-identifier">fan_id</span>)
    <span class="ruby-identifier">list</span> = []
    <span class="ruby-identifier">offset</span> = <span class="ruby-value">0</span>;
    <span class="ruby-identifier">loop</span>{
        <span class="ruby-identifier">set</span> = <span class="ruby-identifier">get_friends_by_offset</span>(<span class="ruby-identifier">fan_id</span>, <span class="ruby-value">100</span>, <span class="ruby-identifier">offset</span>)
        <span class="ruby-identifier">size</span> = <span class="ruby-identifier">set</span>.<span class="ruby-identifier">size</span>
        <span class="ruby-keyword">break</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
        <span class="ruby-identifier">tg</span> = <span class="ruby-constant">ThreadGroup</span>.<span class="ruby-identifier">new</span>
        <span class="ruby-identifier">set</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
            <span class="ruby-identifier">tg</span>.<span class="ruby-identifier">add</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span>{
                <span class="ruby-identifier">wait_sec</span> = <span class="ruby-value">1</span>
                <span class="ruby-keyword">until</span> <span class="ruby-identifier">become_fan</span>(<span class="ruby-identifier">i</span>[<span class="ruby-string">&quot;uid&quot;</span>]).<span class="ruby-identifier">key?</span>(<span class="ruby-string">&quot;success_text&quot;</span>)
                    <span class="ruby-identifier">$tjpLog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>){<span class="ruby-node">&quot;Trying to become #{i[&quot;uid&quot;]}'s fan in #{wait_sec} seconds&quot;</span>}
                    <span class="ruby-identifier">sleep</span>(<span class="ruby-identifier">wait_sec</span>)
                    <span class="ruby-identifier">wait_sec</span> <span class="ruby-operator">*=</span> <span class="ruby-value">2</span>
                <span class="ruby-keyword">end</span>
                <span class="ruby-identifier">$tjpLog</span>.<span class="ruby-identifier">info</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>){<span class="ruby-node">&quot;Become #{i[&quot;uid&quot;]}'s fan successfully&quot;</span>}
            }
        }
        <span class="ruby-identifier">tg</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span>.<span class="ruby-identifier">join</span> }
        <span class="ruby-identifier">list</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">set</span>
        <span class="ruby-identifier">offset</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">size</span>
    }
    <span class="ruby-identifier">list</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
        <span class="ruby-identifier">super_become_fan</span>(<span class="ruby-identifier">i</span>[<span class="ruby-string">&quot;uid&quot;</span>], <span class="ruby-identifier">level</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>)
    }
<span class="ruby-keyword">end</span></pre>
          </div><!-- super_become_fan-source -->
          
        </div>

        

        
      </div><!-- super_become_fan-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- TJPlurker+Provided -->

  
  
  <section id="Timeline" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Timeline
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Timeline-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-favorite_plurks" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">favorite_plurks</span><span
            class="method-args">(ids)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>ids
<dd>
<p>The plurk ids, formated as JSON String or Ruby Array, e.g.
“[342,23242,2323]” or [342,23242,2323]</p>
</dd></dl>
          

          
          <div class="method-source-code" id="favorite_plurks-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 264</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">favorite_plurks</span> <span class="ruby-identifier">ids</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/favoritePlurks&quot;</span>
    <span class="ruby-identifier">ids</span> = <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:ids=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">ids</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- favorite_plurks-source -->
          
        </div>

        

        
      </div><!-- favorite_plurks-method -->

    
      <div id="method-i-get_plurk" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_plurk</span><span
            class="method-args">(plurk_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Get one plurk from user’s timeline</p>
<dl class="rdoc-list note-list"><dt>plurk_id
<dd>
<p>Can be Integer or String</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_plurk-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 176</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_plurk</span> <span class="ruby-identifier">plurk_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/getPlurk&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:plurk_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">plurk_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_plurk-source -->
          
        </div>

        

        
      </div><!-- get_plurk-method -->

    
      <div id="method-i-get_public_plurks" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_public_plurks</span><span
            class="method-args">(user_id, offset=nil, limit=nil, filter=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Get public plurks from user’s timeline</p>
<dl class="rdoc-list note-list"><dt>user_id
<dd>
<p>The user_id of the public plurks owner to get. Can be integer (like 34) or
nick name (like amix).</p>
</dd><dt>offset
<dd>
<p>Return plurks newer than offset, formatted as 2009-6-20T21:55:34 in String
or in Time.</p>
</dd><dt>limit
<dd>
<p>The max number of plurks to be returned (default: 20)</p>
</dd><dt>filter
<dd>
<p>Can be only_user, only_responded, only_private or only_favorite</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_public_plurks-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 209</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_public_plurks</span> <span class="ruby-identifier">user_id</span>, <span class="ruby-identifier">offset</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">limit</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">filter</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/getPublicPlurks&quot;</span>
    <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">offset</span>.<span class="ruby-identifier">utc</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">&quot;%Y-%m-%dT%H:%M:%S&quot;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">offset</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Time</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:user_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">user_id</span>, <span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>, <span class="ruby-value">:limit=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">limit</span>, <span class="ruby-value">:filter=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">filter</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_public_plurks-source -->
          
        </div>

        

        
      </div><!-- get_public_plurks-method -->

    
      <div id="method-i-get_unread_plurks" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_unread_plurks</span><span
            class="method-args">(offset=nil, limit=nil, filter=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Get unread plurks from user’s timeline</p>
<dl class="rdoc-list note-list"><dt>offset
<dd>
<p>Return plurks newer than offset, formatted as 2009-6-20T21:55:34 in String
or in Time.</p>
</dd><dt>limit
<dd>
<p>The max number of plurks to be returned (default: 20)</p>
</dd><dt>filter
<dd>
<p>Can be only_user, only_responded, only_private or only_favorite</p>
</dd></dl>
          

          
          <div class="method-source-code" id="get_unread_plurks-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 197</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_unread_plurks</span> <span class="ruby-identifier">offset</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">limit</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">filter</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/getUnreadPlurks&quot;</span>
    <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">offset</span>.<span class="ruby-identifier">utc</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">&quot;%Y-%m-%dT%H:%M:%S&quot;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">offset</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Time</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>, <span class="ruby-value">:limit=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">limit</span>, <span class="ruby-value">:filter=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">filter</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_unread_plurks-source -->
          
        </div>

        

        
      </div><!-- get_unread_plurks-method -->

    
      <div id="method-i-mark_as_read" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">mark_as_read</span><span
            class="method-args">(ids, note_position=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>ids
<dd>
<p>The plurk ids, formated as JSON String or Ruby Array, e.g.
“[342,23242,2323]” or [342,23242,2323]</p>
</dd><dt>note_position
<dd>
<p>If true responses_seen of the plurks will be updated as well (to match
response_count).</p>
</dd></dl>
          

          
          <div class="method-source-code" id="mark_as_read-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 281</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">mark_as_read</span> <span class="ruby-identifier">ids</span>, <span class="ruby-identifier">note_position</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/markAsRead&quot;</span>
    <span class="ruby-identifier">ids</span> = <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:ids=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">ids</span>, <span class="ruby-value">:note_position=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">note_position</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- mark_as_read-source -->
          
        </div>

        

        
      </div><!-- mark_as_read-method -->

    
      <div id="method-i-mute_plurks" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">mute_plurks</span><span
            class="method-args">(ids)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>ids
<dd>
<p>The plurk ids, formated as JSON String or Ruby Array, e.g.
“[342,23242,2323]” or [342,23242,2323]</p>
</dd></dl>
          

          
          <div class="method-source-code" id="mute_plurks-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 248</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">mute_plurks</span> <span class="ruby-identifier">ids</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/mutePlurks&quot;</span>
    <span class="ruby-identifier">ids</span> = <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:ids=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">ids</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- mute_plurks-source -->
          
        </div>

        

        
      </div><!-- mute_plurks-method -->

    
      <div id="method-i-plurk_add" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">plurk_add</span><span
            class="method-args">(content, qualifier=':', limited_to=nil, no_comments=nil, lang='tr_ch')</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>qualifier
<dd>
<p>The Plurk’s qualifier, must be in English. Can be following:</p>

<pre>loves, likes, shares, gives, hates, wants, has, will, asks, wishes, was,
feels, thinks, says, is, :, freestyle, hopes, needs, wonders</pre>
</dd><dt>limited_to
<dd>
<p>Limit the plurk only to some users (also known as private plurking). Should
can be a JSON list of friend ids in String formatting or Ruby Array, e.g.
[3,4,66,34] or “[3,4,66,34]” will only be plurked to these user ids. If
it’s [0] then the Plurk is privatley posted to the poster’s friends.</p>
</dd><dt>no_comments
<dd>
<p>If set to 1 or “1”, then responses are disabled for this plurk. If set to 2
or “2”, then only friends can respond to this plurk.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="plurk_add-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 225</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">plurk_add</span> <span class="ruby-identifier">content</span>, <span class="ruby-identifier">qualifier</span>=<span class="ruby-string">':'</span>, <span class="ruby-identifier">limited_to</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">no_comments</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">lang</span>=<span class="ruby-string">'tr_ch'</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/plurkAdd&quot;</span>
    <span class="ruby-identifier">limited_to</span> = <span class="ruby-identifier">limited_to</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">limited_to</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:content=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">content</span>, <span class="ruby-value">:qualifier=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">qualifier</span>, <span class="ruby-value">:limited_to=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">limited_to</span>, <span class="ruby-value">:no_comments=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">no_comments</span>, <span class="ruby-value">:lang=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">lang</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- plurk_add-source -->
          
        </div>

        

        
      </div><!-- plurk_add-method -->

    
      <div id="method-i-plurk_delete" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">plurk_delete</span><span
            class="method-args">(plurk_id)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>plurk_id
<dd>
<p>The id of the plurk.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="plurk_delete-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 233</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">plurk_delete</span> <span class="ruby-identifier">plurk_id</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/plurkDelete&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:plurk_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">plurk_id</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- plurk_delete-source -->
          
        </div>

        

        
      </div><!-- plurk_delete-method -->

    
      <div id="method-i-plurk_edit" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">plurk_edit</span><span
            class="method-args">(plurk_id, content)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>plurk_id
<dd>
<p>The id of the plurk.</p>
</dd><dt>content
<dd>
<p>The content of plurk.</p>
</dd></dl>
          

          
          <div class="method-source-code" id="plurk_edit-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 241</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">plurk_edit</span> <span class="ruby-identifier">plurk_id</span>, <span class="ruby-identifier">content</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/plurkEdit&quot;</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:plurk_id=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">plurk_id</span>, <span class="ruby-value">:content=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">content</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- plurk_edit-source -->
          
        </div>

        

        
      </div><!-- plurk_edit-method -->

    
      <div id="method-i-timeline_get_plurks" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">timeline_get_plurks</span><span
            class="method-args">(offset=nil, limit=nil, filter=nil)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Get plurks from user’s timeline</p>
<dl class="rdoc-list note-list"><dt>offset
<dd>
<p>Return plurks older than offset, formatted as 2009-6-20T21:55:34 in String
or in Time.</p>
</dd><dt>limit
<dd>
<p>The max number of plurks to be returned (default: 20)</p>
</dd><dt>filter
<dd>
<p>Can be only_user, only_responded, only_private or only_favorite</p>
</dd></dl>
          

          
          <div class="method-source-code" id="timeline_get_plurks-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 186</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">timeline_get_plurks</span> <span class="ruby-identifier">offset</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">limit</span>=<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">filter</span>=<span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/getPlurks&quot;</span>
    <span class="ruby-identifier">offset</span> = <span class="ruby-identifier">offset</span>.<span class="ruby-identifier">utc</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">&quot;%Y-%m-%dT%H:%M:%S&quot;</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">offset</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Time</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:offset=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">offset</span>, <span class="ruby-value">:limit=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">limit</span>, <span class="ruby-value">:filter=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">filter</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- timeline_get_plurks-source -->
          
        </div>

        

        
      </div><!-- timeline_get_plurks-method -->

    
      <div id="method-i-unfavorite_plurks" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">unfavorite_plurks</span><span
            class="method-args">(ids)</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>ids
<dd>
<p>The plurk ids, formated as JSON String or Ruby Array, e.g.
“[342,23242,2323]” or [342,23242,2323]</p>
</dd></dl>
          

          
          <div class="method-source-code" id="unfavorite_plurks-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 272</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">unfavorite_plurks</span> <span class="ruby-identifier">ids</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/unfavoritePlurks&quot;</span>
    <span class="ruby-identifier">ids</span> = <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:ids=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">ids</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- unfavorite_plurks-source -->
          
        </div>

        

        
      </div><!-- unfavorite_plurks-method -->

    
      <div id="method-i-unmute_plurks" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">unmute_plurks</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <dl class="rdoc-list note-list"><dt>ids
<dd>
<p>The plurk ids, formated as JSON String or Ruby Array, e.g.
“[342,23242,2323]” or [342,23242,2323]</p>
</dd></dl>
          

          
          <div class="method-source-code" id="unmute_plurks-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 256</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">unmute_plurks</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Timeline/unmutePlurks&quot;</span>
    <span class="ruby-identifier">ids</span> = <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ids</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Array</span>
    <span class="ruby-identifier">attr</span> = {<span class="ruby-value">:ids=</span><span class="ruby-operator">&gt;</span><span class="ruby-identifier">ids</span>}
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">attr</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- unmute_plurks-source -->
          
        </div>

        

        
      </div><!-- unmute_plurks-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Timeline -->

  
  
  <section id="Users" class="documentation-section">
    
    <div class="documentation-section-title">
      <h2 class="section-header">
        Users
      </h2>
      <span class="section-click-top">
        <a href="#top">&uarr; top</a>
      </span>
    </div>
    

    
    <div class="description">
      
    </div>
    

    

    

    <!-- Methods -->
    
     <section id="public-instance-Users-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-get_karma_stats" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">get_karma_stats</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>
        

        <div class="method-description">
          
          <p>Returns info about current user’s karma, including current karma, karma
growth, karma graph and the latest reason why the karma has dropped.</p>
          

          
          <div class="method-source-code" id="get_karma_stats-source">
            <pre><span class="ruby-comment"># File lib/tjplurker/core.rb, line 80</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_karma_stats</span>
    <span class="ruby-identifier">method</span> = <span class="ruby-string">&quot;/APP/Users/getKarmaStats&quot;</span>
    <span class="ruby-identifier">api</span>(<span class="ruby-identifier">method</span>)
<span class="ruby-keyword">end</span></pre>
          </div><!-- get_karma_stats-source -->
          
        </div>

        

        
      </div><!-- get_karma_stats-method -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- Users -->

</div><!-- documentation -->


<footer id="validator-badges">
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
  <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
</footer>

